package com.hetwen.myopengl;

import android.content.Context;
import android.opengl.GLSurfaceView;

/**
 * Created by hetwen on 16/3/26.
 */
public class MainView extends GLSurfaceView{

    private MainRenderer mRenderer;

    public MainView(Context context) {
        super(context);
        setEGLContextClientVersion(2);
        mRenderer = new MainRenderer(this);
        setRenderer(mRenderer);
        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }

    @Override
    public void onResume() {
        super.onResume();
        mRenderer.onResume();
    }

    @Override
    public void onPause() {
        mRenderer.onPause();
        super.onPause();
    }
}
